package org.ivwsqii.proxy.jdkDynamicProxy.Client;

import org.ivwsqii.proxy.jdkDynamicProxy.DynamicProxyFactory;
import org.ivwsqii.proxy.staticProxy.BuyCar;
import org.ivwsqii.proxy.staticProxy.User;

public class Client {

	public static void main(String[] args) {
		BuyCar realObject = new User();//真实对象
		DynamicProxyFactory factory = new DynamicProxyFactory(realObject);
		BuyCar proxyObject = (BuyCar)factory.getProxyInstance();
		proxyObject.buyCar();
	}
}
